//2481 1
package L1;
import java.util.Scanner;

/**
 * 复数
 */

public class entry {

    /*
    * -1 有虚数解
    * 0  无解
    * 1  有一个解
    * 2  有两个解
    * 3  有无数个解
    */

    public static int check(final double a, final double b, final double c) {
        if (a == 0 && b == 0) {
            if (c == 0)
                return 3;
            else
                return 0;
        }
        if (b*b - 4*a*c > 0) {
            return 2;
        } else if (b*b - 4*a*c == 0) {
            return 1;
        } else {
            return -1;
        }
    }

    public static void main(final String[] args) {
        double a, b, c;
        double x1,x2;
        Scanner sc = new Scanner(System.in);
        a = sc.nextInt();
        b = sc.nextInt();
        c = sc.nextInt();
        sc.close();
        switch (check(a, b, c)) {
            case -1:
                Complex cm = new Complex(0, Math.sqrt(Math.abs(b*b-4*a*c)));
                cm.real = -b;
                cm.real /= 2*a;
                cm.image /= 2*a;
                System.out.println(String.format("The equation has complex roots, x1 = %f + %fi,  x2 = %f - %fi", cm.real,cm.image,cm.real,cm.image));
                break;
            case 0:
                System.out.println("The equation has no solution.");
                break;
            case 1:
                x1 = (-b + Math.sqrt(b*b-4*a*c))/(2*a);
                System.out.println(String.format("The equation has real roots, x1 = %f,  x2 = %f",x1 ,x1));
                break;
            case 2:
                x1 = (-b + Math.sqrt(b*b-4*a*c))/(2*a);
                x2 = (-b - Math.sqrt(b*b-4*a*c))/(2*a);
                System.out.println(String.format("The equation has real roots, x1 = %f,  x2 = %f",x1 ,x2));
                break;
            case 3:
                System.out.println("There are infinite solutions.");
                break;
        
            default:
                break;
        }
    }
 }
 class Complex {
    double real,image;
    Complex(double real,double image) {
        this.real = real;
        this.image = image;
    }
}
